package cn.wolfcode.crm.query;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

@Setter@Getter
public class ShowLossChartQuery extends QueryObject{

    private  Long safetymechanismId = -1L;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    private String groupType = "e.userName";

    public static Map<String,Object> groupByTypes = new LinkedHashMap<>();

    static{
        groupByTypes.put("e.userName","销售人员");
        groupByTypes.put("s.name","保险机构");
        groupByTypes.put("date_format(ac.visitDate,'%Y-%m')","保单日期(日)");
        groupByTypes.put("date_format(ac.visitDate,'%Y-%m-%d')","保单日期(月)");

    }
}
